<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    <html:base />
    
    <title>Houseinformation.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <html:form action="/houseinformationchange" method="post">
        <table>
                <tr align="center">
                <td colspan="2">
                    ${houseForm.errorMsg}
                </td>
                </tr>
                <tr><html:hidden name="houseForm" property="house_id" value="${houseForm.house_id}"/></tr>
                <tr>
                <td>房屋名（必填）</td>
                <td>
                <html:text name="houseForm" property="house_title">
                ${userRegisterForm.user_name}
                </html:text>
                <br></td>
                </tr>
                <tr>
                <td>地区（必填）</td>
                <td>
                <html:select property="region" name="houseForm" value="${houseForm.region}">
                <html:option value="黄浦区">黄浦区</html:option>
                <html:option value="金山区">金山区</html:option>
                <html:option value="南汇区">南汇区</html:option>
                <html:option value="奉贤区">奉贤区</html:option>
                <html:option value="青浦区">青浦区</html:option>
                <html:option value="嘉定区">嘉定区</html:option>
                <html:option value="宝山区">宝山区</html:option>
                <html:option value="松江区">松江区</html:option>
                <html:option value="闵行区">闵行区</html:option>
                <html:option value="浦东区">浦东区</html:option>
                <html:option value="杨浦区">杨浦区</html:option>
                <html:option value="浦东区">浦东区</html:option>
                <html:option value="虹口区">虹口区</html:option>
                <html:option value="普陀区">普陀区</html:option>
                <html:option value="闸北区">闸北区</html:option>
                <html:option value="长宁区">长宁区</html:option>
                <html:option value="徐汇区">徐汇区</html:option>
                <html:option value="卢湾区">卢湾区</html:option>
                <html:option value="静安区">静安区</html:option>
                <html:option value="崇明县">崇明县</html:option>
                </html:select>
                </td>
                </tr>
                <tr>
				<td>房屋类型（必填）</td>
                <td>
                <html:select property="house_type" name="houseForm" value="${houseForm.house_type}">
            	<html:option value="别墅">别墅</html:option>
            	<html:option value="多层住宅">多层住宅</html:option>
            	<html:option value="民房">民房</html:option>
            	<html:option value="小高层住宅">小高层住宅</html:option>
            	<html:option value="宿舍">宿舍</html:option>
            	</html:select>
            <br></td>
                </tr>                
                <tr>
                <td>房屋地址（必填）</td>
            	<td><html:textarea property="house_address" name="houseForm">
            	${houseForm.house_address}
            	</html:textarea><br></td>
                </tr>
                <tr>
                <td>租金（必填）</td>
            	<td><html:text property="rent" name="houseForm">
            	${houseForm.rent}
            	</html:text>元/每月</td>
                </tr>
                <tr>
                <td>可看房时间（必填）</td>
            	<td><html:text property="look_time" name="houseForm">
            	${houseForm.look_time}
            	</html:text><br></td>
                </tr>
                <tr>
                <td>具体描述</td>
            	<td><html:textarea property="description" name="houseForm">
            	${houseForm.description}
            	</html:textarea><br></td>
                </tr>
		       	<tr>
	        	<td>朝向</td>
	            <td><html:select property="direction" name="houseForm" value="${houseForm.direction}">
	            	<html:option value="南">南</html:option>
	            	<html:option value="北">北</html:option>
	            	</html:select>
	            <br></td>
		       	</tr>
		       	<tr>
	        	<td>房屋公司</td>
	            <td><html:text property="property_management_company" name="houseForm">
	            ${houseForm.property_management_company}
	            </html:text><br></td>
		       	</tr>
		       	<tr>
	        	<td>修建时间</td>
	            <td><html:text property="completed_date" name="houseForm">
	            ${houseForm.completed_date}
	            </html:text><br></td>
		       	</tr>
		       	<tr>
	        	<td>位于几层</td>
	            <td><html:text property="floor" name="houseForm">
	            ${houseForm.floor}
	            </html:text><br></td>
		       	</tr>
		       	<tr>
	        	<td>周围设施</td>
	            <td><html:text property="supporting_facility" name="houseForm">
	            ${houseForm.supporting_facility}
	            </html:text><br></td>
		       	</tr>
		       	<tr>
	        	<td>租赁情况</td>
	            <td><html:select property="lease" name="houseForm" value="${houseForm.lease}">
	            	<html:option value="未出租">未出租</html:option>
	            	<html:option value="已出租">已出租</html:option>
	            	</html:select>
	            <br></td>
		       	</tr>
		       	<c:choose>
		       	<c:when test="${user_id != 0}">
		       	<tr>
		       	<td>置顶情况</td>
		       	<td>${houseForm.mark}
		       	<html:hidden name="houseForm" property="mark" value="${houseForm.mark}"/>
		       	</td>
		       	</tr>
		       	<tr>
		       	<td>房屋验证</td>
		       	<td>${houseForm.watch}
		       	<html:hidden name="houseForm" property="watch" value="${houseForm.watch}"/>
		       	</td>
		       	</tr>
		       	<tr>
		       	<td>发布许可</td>
		       	<td>${houseForm.allow}
		       	<html:hidden name="houseForm" property="allow" value="${houseForm.allow}"/>
		       	</td>
		       	</tr>
                <tr>
                <td align="center"><html:submit value="修改"/><br></td>
                </tr>
                <tr>
                <td>
                <c:if test = "${houseForm.mark == '不置顶'}" >               
                <html:link paramName="houseForm" paramId="house_id" paramProperty="house_id" action="applyformark">
                                          申请置顶	
                </html:link>                
                </c:if>
                </td>
                <td>
                <c:if test="${houseForm.watch == '未验证'}" >                
                <html:link paramName="houseForm" paramId="house_id" paramProperty="house_id" action="applyforwatch">
                                          申请验证房屋	
                </html:link>               
                </c:if>
                </td>
                </tr>
                </c:when>
                <c:otherwise>
                <tr>
                <td>置顶情况</td>
	            <td><html:select property="mark" name="houseForm" value="${houseForm.mark}">
	            	<html:option value="不置顶">不置顶</html:option>
	            	<html:option value="申请置顶">申请置顶</html:option>
	            	<html:option value="置顶">置顶</html:option>
	            	</html:select>
	            <br></td>
	            </tr>
		       	<tr>
		       	<td>房屋验证</td>
	            <td><html:select property="watch" name="houseForm" value="${houseForm.watch}">
	            	<html:option value="未验证">未验证</html:option>
	            	<html:option value="申请验证">申请验证</html:option>
	            	<html:option value="已验证">已验证</html:option>
	            	</html:select>
	            <br></td>
		       	</tr>
		       	<tr>
		       	<td>发布许可</td>
	            <td><html:select property="allow" name="houseForm" value="${houseForm.allow}">
	            	<html:option value="未付款">未付款</html:option>
	            	<html:option value="已付款">已付款</html:option>
	            	</html:select>
	            <br></td>
		       	</tr>
                <tr>
                <td align="center"><html:submit value="修改"/><br></td>
                </tr>
                </c:otherwise>
                </c:choose>
        </table>
        </html:form>
  </body>
</html:html>
